<?php get_header(); ?>
   
<style>
.blog-entry-content a {
text-decoration: none;
max-height: 166px;
}
.blog-entry-content {
height: auto;
}
</style>

            <div class="page-content port-thumbs">
						

						<div id="container" class="clearfix project-listing">
							<div class="filter-posts" id="boxes">
                            
                          <?php $post_query = new WP_Query('showposts=12'); while ( have_posts() ) : the_post(); ?>
                          
                          
                                <div class="box col3 post">
                                    <div class="blog-entry-content clearfix">									
                                        <a href="<?php the_permalink(); ?>" class="project__link" title="New Work—Mark Cappellino">
                                        <?php if(has_post_thumbnail()):?>
                                                    <?php echo get_the_post_thumbnail($post->ID,'attachment-post-thumbnail wp-post-image',array('alt' => $post->post_title))?>
                                                <?php else :?>
                                                    <?php if(get_post_meta(get_the_ID(),'honor_img',true)):?>
                                                        <img src="<?php echo get_post_meta(get_the_ID(),'attachment-post-thumbnail wp-post-image',true)?>" >
                                                    <?php endif;?>
                                                <?php endif;?>
                                        </a>
                          
                                        <h3 class="single-title"><a href="<?php the_permalink(); ?>"><?php echo mb_strimwidth(get_the_title(), 0, 30, '...'); ?></a></h3>      
                                        <p></p>
        <p></p>
                                    </div>
                                </div>

                                    
                  	     <?php endwhile;?>
                            
                           
                         
							</div>
							<div class="clear"></div>
						</div>
                        
						<div class="clear"></div>
                        <a href="#" class="scrollup">返回顶部</a>
						
			</div>
            

<!-- 列表导航 -->
<center class="fetch" style="display:block;width:100px;height:25px;margin:auto;float: inherit;">
<?php pagination($query_string); ?>
</center>


<script type="text/javascript">
// Ajax-fetching "Load more posts"
$('.fetch a').live('click', function(e) {
	e.preventDefault();
	$(this).addClass('loading').text('正在加载...');
	$.ajax({
		type: "GET",
		url: $(this).attr('href') + '#boxes',
		dataType: "html",
		success: function(out) {
			result = $(out).find('#boxes .box');
			nextlink = $(out).find('.fetch a').attr('href');
			result.find('img').imagesLoaded(function() {
				$('#boxes').append(result).masonry('appended', result);
				$('.fetch a').removeClass('loading').text('加载更多文章');
				if (nextlink != undefined) {
					$('.fetch a').attr('href', nextlink);
				} else {
					$('.fetch').remove();
				}
			});
		}
	});
});
</script>





<?php get_footer(); ?>